//用了;
export function getPeopleInfo(that) {
  return new Promise((resolve, reject) => {
    // let that = this;
    uni.getStorage({
      key: "openid",
      success: function (res) {
        // console.log(res);
        that.openid = res.data;
        that
          .$MyRequest({
            url: "/get_all_people",
            method: "POST",
            data: {
              openid: that.openid,
            },
          })
          .then((res) => {
            that.name = res.data.data[0].name;
            resolve(res);
          });
      },
    });
    uni.getStorage({
      key: "userInfo",
      success: function (res) {
        // console.log(res);
        that.yonghuwx = res.data;
        that.show = false;
      },
      fail: (err) => {
        that.show = true;
      },
    });
  });
}

// let that = this;
// uni.getStorage({
//   key: "userInfo",
//   success: function (res) {
//     // console.log(res);
//     that.yonghuwx = res.data;
//     that.show = false;
//   },
//   fail: (err) => {
//     that.show = true;
//   },
// });
